import gc
import subprocess
import random
import time

gc.disable()
name = 2
port = 5991
processes = []

for i in range(5):
    p = subprocess.Popen(['python', 'main.py', 'p'+str(name), str(random.randint(1,10)), str(port)], shell=False, stdin=subprocess.PIPE)
    p.communicate(input='hello 127.0.0.1:5990')[0]
    name += 1
    port += 1
    time.sleep(2)

